/*
 * ---------------------------------------------------------------------
 * Copyright (c) 2014, 2015 All Right Reserved
 * This software is developed for study and improve coding skill ...
 *
 * Project:  Excellent Coding< EC >
 *
 * ecAutoLock.h
 * This file for Mutex auto lock/unlock define.
 *
 * Eamil:   epengao@126.com
 * Author:  Peter Gao
 * Version: Intial first version.
 * --------------------------------------------------------------------
 */

#ifndef EC_AUTOLOCK_H
#define EC_AUTOLOCK_H

#include "ecMutex.h"
#ifdef _WIN32
#include <windows.h>
#elif defined _LINUX
#include <semaphore.h>
#endif

namespace ec {
class ecAutoLock
{
public:
    ecAutoLock(ecMutex* mutex);
    ~ecAutoLock();

private:
    ecMutex*  m_pmtxMutex;
};
} /* namespace ec */
#endif /* EC_AUTOLOCK_H */